package cc.aiee.moneris.config;

import JavaAPI.HttpsPostRequest;
import lombok.Getter;

public class MonerisPayConfigKit {

	private static HttpsPostRequest defaultReq = null;
	@Getter
	private static MonerisPayConfig defaultConfig = null;

	public static synchronized void setDefault(MonerisPayConfig config, boolean isOpenSandbox) {
		defaultConfig = config;
		HttpsPostRequest req = new HttpsPostRequest();
		req.setProcCountryCode(config.getProcCountryCode());
		req.setTestMode(config.isSandbox());
		req.setStoreId(config.getStoreId());
		req.setApiToken(config.getApiToken());
		defaultReq = req;
	}

	public static HttpsPostRequest getDefault() {
		return defaultReq;
	}
}
